﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace WPFSample.MeasureSample
{
    class MeasureWindow : Window
    {
        public MeasureWindow()
        {
            Canvas canvas = new Canvas();
            this.Content = canvas;

            MyPanelParent parent = new MyPanelParent()
            {
                Width = 400,
                Height = 400,
                Background = Brushes.Green
            };
            Canvas.SetLeft(parent, 10);
            Canvas.SetTop(parent, 10);
            canvas.Children.Add(parent);

            MyPanel pnl1 = new MyPanel()
            {
                //Margin = new Thickness(10),
                //Width = 200,
                Background = Brushes.Red,
                //MinWidth = 150,
                //MaxWidth = 250
            };
            parent.Children.Add(pnl1);

            MyPanel pnl2 = new MyPanel()
            {
                //Margin = new Thickness(10),
                //Width = 200,
                Background = Brushes.Blue,
                //MinWidth = 150,
                //MaxWidth = 250
            };
            parent.Children.Add(pnl2);
        }
    }
}
